<html ng-app="sales">
<head>
    <meta charset="UTF-8">
    <title>华成销售管理系统 -- {{title}}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" type="image/x-icon" href="/favicon.ico">
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css"
          href="/css/bootstrap-datetimepicker.min.css">
    <link rel="stylesheet" type="text/css" href="/css/common.css">
    <link rel="stylesheet" type="text/css" href="/css/page.css">
    <link rel="stylesheet" type="text/css" href="/css/picker.css">
    <link rel="stylesheet" type="text/css" href="/css/sorter.css">
</head>
<body>

<div ng-controller="ctrl" class="container">

    <div class="row">
        <p>
           <input ng-model="time">
            <datetime-picker ng-model="time" today-btn="true" format="yyyy-mm-dd hh:ii:ss"></datetime-picker>
            {{time_as_date.toString()}}
        </p>
    </div>

</div>

<script src="/js/jquery-2.1.3.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/angular.min.js"></script>
<script src="/js/angular-route.min.js"></script>
<script src="/js/base/ui-bootstrap-tpls.js"></script>
<script src="/js/common.js"></script>
<script src="/js/bootstrap-datetimepicker.js"></script>

<script src="../app.js"></script>
<script>
    var app = angular.module('sales', [])
            .controller('ctrl', function ($scope) {
                //$scope.time = 1462295151000;
                $scope.$watch('time', function(time){
                    $scope.time_as_date = new Date(time);
                })
            });

    app.directive('userPicker', require('angular-userpicker'))
            .directive('shopPicker', require('angular-shoppicker'))
            .directive('datetimePicker', require('angular-datetimepicker'))
            .directive('salesmanPicker', require('angular-salesmanpicker'))
            .directive('vmPicker', require('angular-vehiclemodelpicker'))
            .directive('vmSelector', require('angular-vehiclemodelcascadeselector'))
            .directive('sorter', require('angular-sorter'));

</script>
</body>
</html>